package com.ch.shopping.controller;

import com.ch.shopping.pojo.User;
import com.ch.shopping.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

/**
 * @author AuthorName
 * @create 2020-04-13 9:29
 */
@RestController
@RequestMapping("/user")
public class UserManagerController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public User test(@PathVariable("id") Integer id) {
        User user = userService.queryUserById(id);
        return user;
    }
    @RequestMapping(value = "/login",method = RequestMethod.GET)
    public void UserLogin(Model model){

    }
}
